<template>
  <div class="log-out">
    <div @click.stop class="contentBox">
      <div>背景</div>
      <div class="conent">你确定要退出登录吗？</div>

      <div class="footer">
        <div class="btnBox" @click="logOut(0)">取消</div>
        <div class="btnBox-comfig" @click="logOut(1)">确认</div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
// import dragConent from '@/components/Dragareacomponent.vue'
import { useUserStore } from '@/pinia/user'
const userStore = useUserStore()

const flage = ref(false)
const logOut = (type: number = 0) => {
  console.log(type)
  window.electron.ipcRenderer.invoke('loginPage-window-close')
  flage.value = !flage.value
  userStore.setName(flage.value ? '李四' : '张三')
  if (type === 1) {
    userStore.setLogOut(true)
  }

}
</script>

<style scoped lang="scss">
.log-out {
  width: 100%;
  height: 100vh;
  padding-top: 103px;
  box-sizing: border-box;
}
.contentBox {
  height: calc(100vh - 103px);
  background: linear-gradient(180deg, #eeeeff 0%, #ffffff 100%);
  box-shadow: 0px 8px 11px 0px rgba(10, 19, 31, 0.06);
  border-radius: 35px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}
.conent {
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;

  color: #333333;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;

  .btnBox {
    cursor: pointer;
    width: 100px;
    height: 32px;
    box-sizing: border-box;
    background: #ebebeb;
    border-radius: 50px;
    line-height: 32px;
    text-align: center;
    &:hover {
      background: #dcdcdc;
      cursor: pointer;
    }
  }
  .btnBox-comfig {
    width: 100px;
    height: 32px;
    box-sizing: border-box;
    background: #296fff;
    border-radius: 50px;
    border: 1px solid #296fff;
    border-radius: 50px;
    line-height: 32px;
    text-align: center;
    color: #fff;
    &:hover {
      background: #1a56d6;
      cursor: pointer;
    }
  }
}
</style>
